Skip to content

feat(console): Agent console reached by drill-down from a roster row (slice 3/6) - #86

Merged
brettchien merged 1 commit into
mainfrom
feat/console-nav-slice-3-agent-console-wiring
Aug 18, 2026
Merged

feat(console): Agent console reached by drill-down from a roster row (slice 3/6)#86
brettchien merged 1 commit into
mainfrom
feat/console-nav-slice-3-agent-console-wiring

Conversation

@brettchien

Copy link
Copy Markdown
Contributor

Slice 3 of the console-navigation-ia ADR (studio#83, mockup §7.4). Builds on slice 2 (#85).

Summary

  • Relocates the existing Agent console (files/config + per-agent chat, agent-consoles.md Part C — internals untouched) so it's reached by drill-down from Fleet detail's roster instead of the always-visible flat agents-wrap selector.
  • agentConsole.ts is not modified. Its selector (#agent-list) still opens a console on a [data-agent] click; that element just moves inside #fleet-detail and is hidden via CSS — it's no longer the entry point users see, but stays wired exactly as before.
  • A roster row's name is now a button (rowHtml, carrying the ECS service name + short name as candidate lookup keys). Clicking it resolves against the hidden selector and dispatches a synthetic click on the matching [data-agent] button — reusing the existing, already-tested open/dial/teardown path rather than duplicating it.
  • A MutationObserver on #agent-console's own hidden attribute swaps the roster for the open console (Part A: drill-down, not tab-peer surfaces) — no second source of truth for "what's open."
  • Leaving the fleet (← Fleets, or switching fleets) also closes any open console, via its own already-wired Close button.
  • A roster row with no matching agents.toml entry logs an info note instead of silently doing nothing.

Test plan

  • tsc --noEmit
  • vitest run (96/96 passing, 2 new cases for the row-open affordance)
  • vite build

🤖 Generated with Claude Code

…(slice 3/6)

Slice 3 of the console-navigation-ia ADR (studio#83, mockup §7.4). Relocates
the existing Agent console (files/config + per-agent chat, agent-consoles.md
Part C) so it's reached by drill-down from Fleet detail's roster instead of
the always-visible flat `agents-wrap` selector.

`agentConsole.ts` is untouched — its selector (`#agent-list`) still opens a
console on a `[data-agent]` click; that element just moves inside
`#fleet-detail` and is hidden via CSS (no longer the entry point users see).
A roster row's name is now a button (`rowHtml`, carrying both the ECS service
name and the short name as candidate lookup keys) that main.ts resolves
against the hidden selector and dispatches a synthetic click on — reusing the
exact, already-tested open/dial/teardown path rather than duplicating it.

A `MutationObserver` on `#agent-console`'s own `hidden` attribute swaps the
roster for the open console (Part A: drill-down, not tab-peer surfaces) without
adding a second source of truth for what's open. Leaving the fleet (back to
Fleets, or switching fleets) also closes any open console via its own wired
Close button.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@brettchien
brettchien merged commit 25b6ed4 into main Aug 18, 2026
2 checks passed
@brettchien
brettchien deleted the feat/console-nav-slice-3-agent-console-wiring branch August 18, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant